package com.microlecture.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public class Cookbook {
    private Integer id;

    private Integer userid;

    private String cookbookname;

    private BigDecimal price;

    private BigDecimal additionalamount;

    private String style;

    private String appropriatecrowd;

    private String craft;

    private String taste;

    private String duration;

    private String difficulty;

    private String tip;

    private Integer browsequantity;

    private String auditstate;

    private Integer auditor;

    private Date createdate;

    private String coverimg;

    private Integer orderNumber;

    private Integer disscussNumber;

    private Double foodPrice;

    private Integer stepNumber;

    private List<CookbookFood> cookbookFoods;

    public List<CookbookFood> getCookbookFoods() {
        return cookbookFoods;
    }

    public void setCookbookFoods(List<CookbookFood> cookbookFoods) {
        this.cookbookFoods = cookbookFoods;
    }

    public Integer getStepNumber() {
        return stepNumber;
    }

    public void setStepNumber(Integer stepNumber) {
        this.stepNumber = stepNumber;
    }

    public Double getFoodPrice() {
        return foodPrice;
    }

    public void setFoodPrice(Double foodPrice) {
        this.foodPrice = foodPrice;
    }

    public Integer getDisscussNumber() {
        return disscussNumber;
    }

    public void setDisscussNumber(Integer disscussNumber) {
        this.disscussNumber = disscussNumber;
    }

    public Integer getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(Integer orderNumber) {
        this.orderNumber = orderNumber;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getCookbookname() {
        return cookbookname;
    }

    public void setCookbookname(String cookbookname) {
        this.cookbookname = cookbookname == null ? null : cookbookname.trim();
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getAdditionalamount() {
        return additionalamount;
    }

    public void setAdditionalamount(BigDecimal additionalamount) {
        this.additionalamount = additionalamount;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style == null ? null : style.trim();
    }

    public String getAppropriatecrowd() {
        return appropriatecrowd;
    }

    public void setAppropriatecrowd(String appropriatecrowd) {
        this.appropriatecrowd = appropriatecrowd == null ? null : appropriatecrowd.trim();
    }

    public String getCraft() {
        return craft;
    }

    public void setCraft(String craft) {
        this.craft = craft == null ? null : craft.trim();
    }

    public String getTaste() {
        return taste;
    }

    public void setTaste(String taste) {
        this.taste = taste == null ? null : taste.trim();
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration == null ? null : duration.trim();
    }

    public String getDifficulty() {
        return difficulty;
    }

    public void setDifficulty(String difficulty) {
        this.difficulty = difficulty == null ? null : difficulty.trim();
    }

    public String getTip() {
        return tip;
    }

    public void setTip(String tip) {
        this.tip = tip == null ? null : tip.trim();
    }

    public Integer getBrowsequantity() {
        return browsequantity;
    }

    public void setBrowsequantity(Integer browsequantity) {
        this.browsequantity = browsequantity;
    }

    public String getAuditstate() {
        return auditstate;
    }

    public void setAuditstate(String auditstate) {
        this.auditstate = auditstate == null ? null : auditstate.trim();
    }

    public Integer getAuditor() {
        return auditor;
    }

    public void setAuditor(Integer auditor) {
        this.auditor = auditor;
    }

    public Date getCreatedate() {
        return createdate;
    }

    public void setCreatedate(Date createdate) {
        this.createdate = createdate;
    }

    public String getCoverimg() {
        return coverimg;
    }

    public void setCoverimg(String coverimg) {
        this.coverimg = coverimg == null ? null : coverimg.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userid=").append(userid);
        sb.append(", cookbookname=").append(cookbookname);
        sb.append(", price=").append(price);
        sb.append(", additionalamount=").append(additionalamount);
        sb.append(", style=").append(style);
        sb.append(", appropriatecrowd=").append(appropriatecrowd);
        sb.append(", craft=").append(craft);
        sb.append(", taste=").append(taste);
        sb.append(", duration=").append(duration);
        sb.append(", difficulty=").append(difficulty);
        sb.append(", tip=").append(tip);
        sb.append(", browsequantity=").append(browsequantity);
        sb.append(", auditstate=").append(auditstate);
        sb.append(", auditor=").append(auditor);
        sb.append(", createdate=").append(createdate);
        sb.append(", coverimg=").append(coverimg);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Cookbook other = (Cookbook) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getCookbookname() == null ? other.getCookbookname() == null : this.getCookbookname().equals(other.getCookbookname()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getAdditionalamount() == null ? other.getAdditionalamount() == null : this.getAdditionalamount().equals(other.getAdditionalamount()))
            && (this.getStyle() == null ? other.getStyle() == null : this.getStyle().equals(other.getStyle()))
            && (this.getAppropriatecrowd() == null ? other.getAppropriatecrowd() == null : this.getAppropriatecrowd().equals(other.getAppropriatecrowd()))
            && (this.getCraft() == null ? other.getCraft() == null : this.getCraft().equals(other.getCraft()))
            && (this.getTaste() == null ? other.getTaste() == null : this.getTaste().equals(other.getTaste()))
            && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration()))
            && (this.getDifficulty() == null ? other.getDifficulty() == null : this.getDifficulty().equals(other.getDifficulty()))
            && (this.getTip() == null ? other.getTip() == null : this.getTip().equals(other.getTip()))
            && (this.getBrowsequantity() == null ? other.getBrowsequantity() == null : this.getBrowsequantity().equals(other.getBrowsequantity()))
            && (this.getAuditstate() == null ? other.getAuditstate() == null : this.getAuditstate().equals(other.getAuditstate()))
            && (this.getAuditor() == null ? other.getAuditor() == null : this.getAuditor().equals(other.getAuditor()))
            && (this.getCreatedate() == null ? other.getCreatedate() == null : this.getCreatedate().equals(other.getCreatedate()))
            && (this.getCoverimg() == null ? other.getCoverimg() == null : this.getCoverimg().equals(other.getCoverimg()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getCookbookname() == null) ? 0 : getCookbookname().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getAdditionalamount() == null) ? 0 : getAdditionalamount().hashCode());
        result = prime * result + ((getStyle() == null) ? 0 : getStyle().hashCode());
        result = prime * result + ((getAppropriatecrowd() == null) ? 0 : getAppropriatecrowd().hashCode());
        result = prime * result + ((getCraft() == null) ? 0 : getCraft().hashCode());
        result = prime * result + ((getTaste() == null) ? 0 : getTaste().hashCode());
        result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode());
        result = prime * result + ((getDifficulty() == null) ? 0 : getDifficulty().hashCode());
        result = prime * result + ((getTip() == null) ? 0 : getTip().hashCode());
        result = prime * result + ((getBrowsequantity() == null) ? 0 : getBrowsequantity().hashCode());
        result = prime * result + ((getAuditstate() == null) ? 0 : getAuditstate().hashCode());
        result = prime * result + ((getAuditor() == null) ? 0 : getAuditor().hashCode());
        result = prime * result + ((getCreatedate() == null) ? 0 : getCreatedate().hashCode());
        result = prime * result + ((getCoverimg() == null) ? 0 : getCoverimg().hashCode());
        return result;
    }
}